package com.qianyu.project.core.mapper.provider;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianyu.project.core.bean.Flow;
import org.apache.ibatis.jdbc.SQL;
import org.springframework.util.StringUtils;

import java.util.Map;

/**
 * @Author mfy
 * @desc
 */
public class FlowProvider {

    public String list(IPage<Flow> iPage, Map<String, String> param){
        return new SQL(){
            {
                SELECT("*");
                FROM("FLOW f,system_authority sa");
                WHERE("f.moduleId=sa.id");
                if (!StringUtils.isEmpty(param.get("flowName"))){
                    WHERE("f.flowName like '%"+param.get("flowName")+"%'");
                }
            }
        }.toString();
    }

}
